Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to stop the service upon disconnect #399

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kmod-midori
Copy link

@kmod-midori kmod-midori commented Jul 23, 2021

A new option -s is added so that we have the option to stop the client when the cable is unplugged, the default secure behavior is kept.

Tested on macOS with my Pixel on Android 10.

Fixes #51, fixes #234, fixes #388.

@rom1v
Copy link
Collaborator

rom1v commented Jul 23, 2021

Thank you 👍 That will be useful :)

However, I will not be able to review this before next month.

@kmod-midori
Copy link
Author

That’s fine. In the meantime I’ll make the Java server part of this change ready (I did not do that since I only use the Rust version)

@ungive
Copy link

ungive commented Jan 8, 2022

This does not close the app, when it is running on a work profile that was created with Island (I don't know if this behaves the same with work profiles that were created with different methods).

See #408 for instructions to get gnirehtet to function on a work profile.

Edit: Perhaps this happens because I started the GnirehtetActivity manually, but I'm not sure. I just wanted to point this out, in case something ever gets implemented that also starts the app on work profiles, while this is merged into the codebase!

@kmod-midori
Copy link
Author

That should be done with the same way Gnirehtet is started in a work profile, otherwise the option to stop the service is sent to the main profile. (If you start the activity manually, there is no way for us to specify this, since the Android application does not really have a UI). Work profile support would be needed in many parts of the relay for this to work.

@Serega007RU
Copy link

hello, please give me a compiled version of this PR, I don't understand how to compile this project

@Linus789
Copy link

For those who are interested: I made a custom Gnirehtet app where you can activate a setting to stop the service on disconnect. Link: https://github.com/Linus789/gnirehtetx

@Serega007RU
Copy link

For those who are interested: I made a custom Gnirehtet app where you can activate a setting to stop the service on disconnect. Link: https://github.com/Linus789/gnirehtetx

Why isn't it a fork?

@Linus789
Copy link

Why isn't it a fork?

There is no good reason why it isn’t a fork. For some reason I just didn’t think of that.

@Serega007RU
Copy link

Why isn't it a fork?

There is no good reason why it isn’t a fork. For some reason I just didn’t think of that.

It's bad that your repository is not a fork. This suggests that you have viruses or you are doing something fraudulent. If it were a fork, it would be easy to check your changes in the code, but this is not the case. Therefore, I do not want to download your solution because of suspected viruses. Maintain your git properly

@vanGrunz
Copy link

For those who are interested: I made a custom Gnirehtet app where you can activate a setting to stop the service on disconnect. Link: https://github.com/Linus789/gnirehtetx

Thank you for this great piece of software!

Installation was not that difficult, just download GnierehtetX, install it on my mobile phone & had to exchange "gnirehtet.exe" with a such renamed "app-release.apk" in original Gnirehtet's directory so the file names & versions do match.

Also very great is the ability to exclude specific programs from using GnirehtetX's VPN tunnel, so software like F-Droid, which does not seem to recognize such an internet connection, can use WLAN or mobile.

Thanks again, this makes my day much easier and in a more carefree manner! Just plugging in the USB cable for charging & being simultaneously online to save volume of data -- and just unplugging without any more necessary interactions. 👍

@Fuseteam
Copy link

@rom1v any chance on getting this reviewed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants